import request from "@/utils/request";
import type { LoginReuqestData } from "./type";

// 图书总量
export const getTotalBookCount = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getTotalBookCount",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
// 获取开闭馆时间
export const getOpenHour = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getOpenHour",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};

// 获取预约盘点数量
export const getInventoryPlanCount = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getInventoryPlanCount",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};

//获取预约盘点信息统计
export const getInventoryPlanInfo = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getInventoryPlanInfo",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
//获取月图书报表统计
export const getMonthReportCount = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getMonthReportCount",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};

//获取星期盘点信息统计
export const getWeekInventoryInfo = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getWeekInventoryInfo",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
//获取机器人电量
export const getRobotsPower = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getRobotsPower",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
//获取机器人使用状态
export const getRobotActiveState = (aesKeyByRsa: any) => {
  return request<LoginReuqestData<any>, any>({
    url: "/api/v1/statistics/getRobotActiveState",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};

// export const addFormUser = (id: any) => {
//   return request<LoginReuqestData<any>, any>({
//     url: "/api/v1/users/form",
//     method: "post",
//     data: id,
//     headers: {
//       //需要加密的请求在头部塞入标识
//       isEncrypt: 1,
//     },
//   });
// };
